projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81c3310
)
(current_lock_owner): If readlink returns ERANGE,
author
Gerd Moellmann
<gerd@gnu.org>
Thu, 13 Sep 2001 14:05:17 +0000
(14:05 +0000)
committer
Gerd Moellmann
<gerd@gnu.org>
Thu, 13 Sep 2001 14:05:17 +0000
(14:05 +0000)
take that to mean that the buffer is too small.
src/filelock.c
patch
|
blob
|
history
diff --git
a/src/filelock.c
b/src/filelock.c
index 44db9722f91048c165114f79b72731eb2b60b6c4..6e78a05e30954022807059011b236f1f6b4017f6 100644
(file)
--- a/
src/filelock.c
+++ b/
src/filelock.c
@@
-436,6
+436,11
@@
current_lock_owner (owner, lfname)
bufsize *= 2;
lfinfo = (char *) xrealloc (lfinfo, bufsize);
len = readlink (lfname, lfinfo, bufsize);
+#ifdef ERANGE
+ /* HP-UX reports ERANGE if the buffer is too small. */
+ if (len == -1 && errno == ERANGE)
+ continue;
+#endif
}
while (len >= bufsize);